package com.bdqn.t350.proxy;

import net.sf.cglib.proxy.Enhancer;

public class IntermediaryCglibProxyFactory {

    private static IntermediaryMethodInterceptor callBack = new IntermediaryMethodInterceptor();

    public static <T> T create(Class<T> target) {
        Enhancer enhancer = new Enhancer();
        enhancer.setCallback(callBack);
        enhancer.setSuperclass(target);
        return (T) enhancer.create();
    }
}
